plugor.ext = {
	contains : function(a,b){
		return document.documentElement.contains ? 
				a !== b && (a.contains ? a.contains(b) : true):
					(document.documentElement.compareDocumentPosition ? 
							!!(a.compareDocumentPosition(b) & 16) : false
					)
	},
	isHover : function( e ,target) {
		// Check if mouse(over|out) are still within the same parent element
		var related = e.relatedTarget;
		return !plugor.ext.contains(target, related ) && !(related === target);
	},
	mouseHover : function(o,over,out){
		var execute = function(e,target,fn){
			if(plugor.ext.isHover(plugor.fix.event(e),target)){
				fn(o);
			}
		};
		o.onmouseover = function(e){
			execute(e,this,over);
		};
		o.onmouseout = function(e){
			execute(e,this,out);
		};
	}
};